package test.y2020;

import cn.hutool.core.lang.Console;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2020/7/3 16:58
 */
public class July1 {
    public static void main(String[] args) {

        HashMap<String, String> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("1", "a");
        objectObjectHashMap.put("2", "a");
        objectObjectHashMap.put("3", "b");

        final Map<String, List<Map.Entry<String, String>>> collect = objectObjectHashMap.entrySet().stream().collect(Collectors.groupingBy(c -> c.getValue()));


        Console.error(collect);


    }
}
